<template>
  <div class="listen">
    <div class="content">
      <ul>
        <li
          v-for="(item, index) in list"
          :key="index"
          :style="{
            background: 'url(' + item.program.coverUrl + ')',
            'background-size': 'cover',
          }"
        >
          <span>播放量:{{ item.__ob__.value.program.secondCategoryId }}</span>
          <p>{{ item.__ob__.value.program.name }}</p>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import { reqListenApi } from "../../../api/redio";
export default {
  data() {
    return {
      list: [],
    };
  },
  computed: {},
  watch: {},

  methods: {
    async getreqListenApi() {
      const result = await reqListenApi({ limit: 30 });
      console.log(result);
      if (result.status === 200) {
        console.log(result.data.toplist);
        this.list = result.data.toplist;
      }
    },
  },
  created() {
    this.getreqListenApi();
  },
  mounted() {},
  components: {},
};
</script>
<style scoped>
.content {
  width: 100%;
}
.content ul {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  background-color: #ccc;
  padding-bottom: 55px;
}
.content ul li {
  display: inline-block;
  width: 47%;
  height: 193px;
  /* background-color: red; */
  background-size: cover;
  position: relative;
  margin-top: 10px;
}
.content ul li span {
  display: inline-block;
  position: absolute;
  left: 2px;
  bottom: 40px;
  font-size: 12px;
}
.content ul li p {
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: coral;
}
</style>
<style scoped></style>
